Skip to content

Conversation

@slang25
Copy link

@slang25 slang25 commented Jan 10, 2026

Problem

When setting the terminal background to a translucent or transparent background, the canvas writing approach ends up stacking up stale content. This PR fixes that.

My first draft actually looked at the background color to decide if it was opaque and then skipped the clearRect for that scenario, however I don't think there is a perf hit here so have gone for the more simple approach, if you'd prefer this other approach then please let me know 🙂

Summary

  • Add clearRect before fillRect in canvas rendering methods to properly clear previous content
  • Fixes content piling up when using transparent/translucent background colors
  • Ensures selection highlighting clears properly with transparent backgrounds

Test plan

  • Set terminal background to a transparent color (e.g., rgba(0,0,0,0))
  • Verify terminal content clears properly instead of accumulating
  • Verify selection highlighting works correctly

🤖 Generated with Claude Code

slang25 and others added 2 commits January 10, 2026 11:46
When using a transparent background color, fillRect composites rather than
replaces pixels. Add clearRect before fillRect in renderLine, clear, and
renderScrollbar to properly erase previous content before applying the
background color. This fixes content piling up when using transparent
backgrounds and ensures selection highlighting clears properly.

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
@sreya
Copy link
Contributor

sreya commented Jan 13, 2026

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants